Merge "registration: Vary the loaded queue cache on $wgVersion"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 25 Sep 2015 17:02:40 +0000 (17:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 25 Sep 2015 17:02:40 +0000 (17:02 +0000)
includes/registration/ExtensionRegistry.php

index 23e29d8..f91aeff 100644 (file)
@@ -114,12 +114,22 @@ class ExtensionRegistry {
        }
 
        public function loadFromQueue() {
+               global $wgVersion;
                if ( !$this->queued ) {
                        return;
                }
 
+               // A few more things to vary the cache on
+               $versions = array(
+                       'registration' => self::CACHE_VERSION,
+                       'mediawiki' => $wgVersion
+               );
+
                // See if this queue is in APC
-               $key = wfMemcKey( 'registration', md5( json_encode( $this->queued ) ), self::CACHE_VERSION );
+               $key = wfMemcKey(
+                       'registration',
+                       md5( json_encode( $this->queued + $versions ) )
+               );
                $data = $this->cache->get( $key );
                if ( $data ) {
                        $this->exportExtractedData( $data );